package site.wtcc.originalfavor.func.exception;

import lombok.Getter;

/**
 * 响应代码
 *
 * @author hexiaodou
 * @date 2022/09/05 15:49:43
 */
@SuppressWarnings("unused")
@Getter
public enum ResponseCode {

    SUCCESS(20000, "操作成功"),
    NO_AUTH(40100, "没权限"),
    NEED_LOGIN(40110, "未登录"),
    FORBIDDEN(40300, "禁止访问"),
    FAIL(41000, "操作失败"),
    BAD_ARGUMENT(41001, "参数错误"),
    FAIL_CHECK_ARGUMENT(41002, "参数校验错误"),
    NULL_ARGUMENT(41003, "参数为null"),
    OBJECT_NOT_FOUND(41004, "对象不存在"),
    LOGIN_FAIL(41005, "登录失败"),
    ERROR(50000, "服务器异常"),
    FOREIGN_ERROR(50002, "外部服务错误"),
    SYSTEM_ERROR(500, "系统异常"),
    ;

    private final Integer code;
    private final String message;

    ResponseCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

}
